﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;

namespace qly
{
    class UsersDAL
    {
        public UsersDAL() { }
        public DataTable DocDanhUsers(string username, string pass)
        {
            SqlConnection conn = SQLDatabase.Connection;
            conn.Open();
            SqlCommand cmd = new SqlCommand("select * from users where username='" + username + "' and pass='" + pass + "'", conn);
            SqlDataReader dr = cmd.ExecuteReader();
            DataTable dt = new DataTable();
            dt.Load(dr);
            return dt;
        }
    }
}
